<?php $this->load->view('layout/header');?>
<div class="supplier-content-page">
    <div class="product-test-h5">
        <ul class="breadcrumb">
            <li><a href="javascript:;">旅游商品</a></li>
            <li class="active"><a href="<?php echo site_url('tourismgoodsbargaining/grid').'?goods_attr_id='.$this->input->get('goods_attr_id')?>"> 商品议价</a></li>
        </ul>
        <div class="product-view-area">
            <p>商品议价</p>
            <a href="<?php echo site_url('tourismgoodsbargaining/add').'?goods_attr_id='.$this->input->get('goods_attr_id')?>">议价</a>
        </div>
        <?php echo execute_alert_message();?>
        <div class="tourism-product-list">
            <?php if ($page_list->num_rows() > 0 ):?>
                <table class="table">
                    <thead>
                        <tr>
                            <th>分销商</th>
                    	    <th>分销价</th>
                    	    <th>手续费</th>
                    	    <th>结算方式</th>
                    	    <th>创建时间</th>
                    	    <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                    <?php foreach($page_list->result() as $item):?>
                        <tr>
                    		<td><?php echo $item->alias_name.'/'.$item->user_name;?></td>
                            <td><?php echo $item->shop_price;?></td>
                            <td><?php echo $item->poundage;?></td>
                            <td><?php if($item->node==1){echo '系统结算'; }elseif ($item->node==2){echo '自主结算';}?></td>
                            <td><?php echo $item->created_at;?></td>
                            <td>
                               <?php if ($item->status== 1) :?>
                                <a class="btn btn-warning btn-xs" href="<?php echo site_url('tourismgoodsbargaining/upOrDown/'.$item->bargaining_id).'?goods_attr_id='.$item->goods_attr_id.'&status='.$item->status;?>" onclick="return confirm('确定要禁用？')">禁用</a>
                               <?php elseif ($item->status==0) :?>
                                <a class="btn btn-info btn-xs" href="<?php echo site_url('tourismgoodsbargaining/upOrDown/'.$item->bargaining_id).'?goods_attr_id='.$item->goods_attr_id.'&status='.$item->status;?>" onclick="return confirm('确定要启用？')">启用</a>
                               <?php endif;?>
                                <a class="btn btn-danger btn-xs" href="<?php echo site_url('tourismgoodsbargaining/delete/'.$item->bargaining_id).'?goods_attr_id='.$item->goods_attr_id; ?>" onclick="return confirm('确定要删除？')">删除</a>
                            </td>
                        </tr>
                    <?php endforeach;?>
                    </tbody>
                </table>
            <?php else: ?>
                <div class="none-data">暂无数据</div>
            <?php endif;?>
        </div>
    </div>
</div>
<?php $this->load->view('layout/footer');?>